package Finance::NSCC::Insurance::Schema::ContractEvent;

use strict;
use warnings;

use base 'DBIx::Class';

__PACKAGE__->load_components("Core");
__PACKAGE__->table("contract_events");
__PACKAGE__->add_columns(
  "nscc_num",
  { data_type => "CHAR", default_value => "", is_nullable => 0, size => 4 },
  "contract_num",
  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 30 },
  "period_type_code",
  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 3 },
  "event_type_code",
  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 3 },
  "gross_net_i",
  { data_type => "CHAR", default_value => "", is_nullable => 0, size => 1 },
  "total_amt",
  { data_type => "DECIMAL", default_value => "", is_nullable => 0, size => 16 },
);
__PACKAGE__->set_primary_key(
  "nscc_num",
  "contract_num",
  "period_type_code",
  "event_type_code",
  "gross_net_i",
);

__PACKAGE__->belongs_to(contract => 'Finance::NSCC::Insurance::Schema::Contract',
                        {
                         'foreign.nscc_num'     => 'self.nscc_num',
                         'foreign.contract_num' => 'self.contract_num',
                        }
                       );

1;
